<template>
  <div>
      <p>{{total}}</p>
      <emit v-on:increment = "incrementTotal" v-on:childTest = "test"></emit>
      <emit v-on:increment = "incrementTotal"></emit>
     <emit v-on:childTest = "test"></emit>
  </div>
</template>
<script>
import emit from './components/emit'
    export default{
        data(){
            return {
                total: 0
            }
        },
        components: {emit},
        methods: {
            incrementTotal: function(){
                this.total += 1;
            },
            test:function(){
                console.log("test")
            }
        }
    }
</script>
